<%@page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class="root61">
<head>
	<%@include file="/views/common/include/taglib.jsp"%>
	<%@include file="/views/common/include/head.jsp"%>
		<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/sectionparent.css"  />
	<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/admin.css" />
	<link type="text/css" rel="stylesheet" href="${ctx}/css/dlifestyle/table.css" />
	<script src="${ctx}/js/controllers/base/shopcategory/shopcategoryEditController.js" type="text/javascript"></script>
	<style type="text/css">
		#sort{
   		    height: 28px;
    		margin-top: 3px;
    		padding-left: 15px;
    		font-size: 14px;
   			border: 1px solid #ccc;
    		border-radius: 10px;
   		}
	</style>
</head>
<body style="margin: 0px">
	<section class="mainborder">
       <section class="edit_scrollable padder">
         <div class="edit_content">
		<form id="myFrom">
			 <div class="form" >
			 <div class="item">
					<label class="col-sm-1 editlable">名称：</label>
					<div class="fl">
				 		<input id="shopCategoryid" type="hidden" value="${shopCategory.id}">
						<input class="editform-control" id="shopCategoryName" type="text" value="${shopCategory.name}" class="text" maxlength="20" placeholder="请输入名称（最多20字）"/>
						<em class="emStyle">*</em>
					</div>
				</div>
			    <div class="item">
					<input id="level" type="hidden" value="${shopCategory.level}">
		              <label class="col-sm-1 editlable">等级：</label>
		                <div class="fl">
		                  <c:if test="${type == 1 }">
		                  	<select class="editform-control" disabled="disabled" style="height:31px;width:130px" id="categorylevel" >
		                  		<option value="" >请选择等级</option>
						 	 	<option id="level1" value="1" selected="selected">一级</option>
						 	 	<option id="level2" value="2" >二级</option>
						 	 	<option id="level3" value="3" >三级</option>
		                  	</select>
		                  	<em class="emStyle">*</em>
		                  </c:if>
		                  
		                  <c:if test="${type == 2 }">
		                  		<c:if test="${1 == shopCategory.level}">
		                  			<input class="editform-control" value="一级" type="text" disabled="disabled">
		                  		</c:if>
		                  		<c:if test="${2 == shopCategory.level}">
		                  			<input class="editform-control" value="二级" type="text" disabled="disabled">
		                  		</c:if>
		                  		<c:if test="${3 == shopCategory.level}">
		                  			<input class="editform-control" value="三级" type="text" disabled="disabled">
		                  		</c:if>
		                  </c:if>
		           </div>
		       </div>
			   
				<c:if test="${type == 1 }">
					<div class="item" id="parantCategory" style="display: none;">
						<span class="col-sm-1 editlable">上级分类：</span>
							<div class="fl">
								<select class="editform-control" style="height:31px;width:216px;" id="parent" >
		                  			<option value="">请选择上级分类</option>
		                 		</select>
		                	 <em class="emStyle">*</em>
							</div>
					</div>
				 </c:if>
				 <c:if test="${type == 2 && shopCategory.level != 1}">
					 <div class="item">
						<span class="col-sm-1 editlable">上级分类：</span>
							<div class="fl">
								<input class="editform-control" value="${parentCategory.name}" type="text" disabled="disabled">
							</div>
					</div>
				 </c:if>
				 
				<div class="item">
					<span class="col-sm-1 editlable">排序：</span>
					<div class="fl">
						<input id="sort" class="sortEdit" onblur="checkSort();" type="number"maxlength="50" value="${shopCategory.sort == null ? 1 : shopCategory.sort}">
					   <em class="emStyle">*</em>
					</div>
				</div>
				<!-- <div class="item"> -->
				
				<!-- </div> -->
				<div class="item">
					<span class="col-sm-1 editlable">描述：</span>
					<div class="fl">
						<input class="editform-control" id="describe" type="text" maxlength="200" value="${shopCategory.descrip}" placeholder="请输入相关描述（最多200字）">
					</div>
				</div>
				<div class="item">
					<span class="col-sm-1 editlable">备注：</span>
					<div class="fl">
						<input class="editform-control" id="memo" type="text" maxlength="100" value="${shopCategory.memo}" placeholder="请输入备注（最多100字）">
					</div>
				</div>
			</div>
				</form>
			</div>
                    <div class="itemEditMap" style="height:100px">
                    <input id="imageLogo" type="hidden" value="${shopCategory.logo }">
                    <span class="col-sm-1 editlableEditMap" style="height:100px;line-height:100px;width:145px;">图像：</span>
                    <div class="flEditMap" style="height:100px;">
                        <c:if test="${shopCategory.logo == null || shopCategory.logo == ''}">
                            <img id="preview3" style="width:70px;height:70px;float:left;margin-top:10px;" title="快上传店铺分类头像吧" src="${ctx}/images/shop_logo.jpg" />
                        </c:if>
                        <c:if test="${shopCategory.logo != null && shopCategory.logo != ''}">
                            <img id="preview3" style="width:70px;height:70px;float:left;margin-top:10px;" src="${sessionScope.image_logo}${shopCategory.logo}" />
                        </c:if>
                        <div class="mtjxsa" style="float:left;width: 300px;margin-left: 30px;height: 87px;padding-bottom: 0px;padding-top: 0px;">
                              <p style="text-align: left;font-size:12px;" id="imageBtn">
                                  <input type="hidden" name="imageLogoUrl" id="imageLogo" value="${shopCategory.logo}"/>
                                  <label class="lbl">提示：只能上传.jpg, .png的图片格式,照片文件大小最大为10MB</label>
                                  
                              </p>
                              <div>
                                  <div class="fl">
                                      <button style="width:100px;height:25px;margin-top: 5px; background-color: #593505;color: #fff;border: 0px;line-height:25px;" class="acblu tctpsc">上传头像</button>
                                  </div>
                              </div>
                          </div>
                        <%@include file="/views/common/uploader/picture.jsp" %>
                    </div>
                </div>
		</section>
	</section>
    	<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
	</script>             
	<script type="text/javascript">
		document.getElementById("myFrom").reset();
	</script>
	<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
	<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
</body>
</html>
